package model

import (
	"time"
)

type Account struct {
	AccountId int `xorm:"pk autoincr"`
	DepartMentId int
	AccountName string
	Level int
	Incumbency int
	CreatedAt time.Time
  	UpdatedAt time.Time
}

func (at *Account)InsertAccount(a *Account) map[string]string{
	x.Insert(a)
	return map[string]string{"message": "成功","code":"200"}
}

func (at *Account)QueryAccountOne(aId int) *Account{
	var a *Account
	_, err := x.Id(aId).Get(a)
	if err != nil{
		return nil
	}
	return a
}